home *** CD-ROM | disk | FTP | other *** search
- function init()
- {
- var _loc2_ = Tardis.ActiveSection.id;
- var _loc1_ = Tardis.Colors;
- strSECTION_COLOR = _loc1_.getString(_loc2_);
- SECTION_COLOR = _loc1_.getHex(_loc2_);
- strSECTION_COLOR50 = _loc1_.getString(_loc2_ + "50");
- SECTION_COLOR50 = _loc1_.getHex(_loc2_ + "50");
- DEFAULT_COLOR = _loc1_.getHex("default");
- DEFAULT_COLOR50 = _loc1_.getString("default50");
- strDEFAULT_COLOR = _loc1_.getString("default");
- cost = nodeData.byName("cost").getText();
- onComplete();
- var strTitle = "<FONT COLOR=\"" + strSECTION_COLOR + "\">" + nodeData.byName("labels").byName("title").getText() + "</FONT> ";
- title_FF.htmlText = strTitle;
- var strIntro = "<FONT COLOR=\"" + strDEFAULT_COLOR + "\">" + nodeData.byName("labels").byName("intro").getText() + "</FONT> ";
- intro_FF.htmlText = strIntro;
- currency_1.htmlText = currency_2.htmlText = nodeData.byName("labels").byName("currency").getText();
- var _loc3_ = "<FONT COLOR=\"" + strDEFAULT_COLOR + "\">" + nodeData.byName("labels").byName("byline1").getText() + "</FONT> ";
- byline_1.htmlText = _loc3_;
- var strByline2 = "<FONT COLOR=\"" + strDEFAULT_COLOR + "\">" + nodeData.byName("labels").byName("byline2").getText() + "</FONT> ";
- byline_2.htmlText = strByline2;
- calculate.txt.htmlText = nodeData.byName("labels").byName("calculate").getText();
- calculate.txt.autoSize = "left";
- calculate.arrowMC._x = calculate.txt._width + 4;
- }
- stop();
- onReady();
- var cost;
- calculate.onPress = function()
- {
- var _loc1_ = Math.ceil(cost / Number(income_txt.text));
- if(_loc1_ == Infinity || isNaN(_loc1_) || _loc1_ < 1)
- {
- var _loc3_ = "<FONT COLOR=\"" + strSECTION_COLOR + "\">" + nodeData.byName("labels").byName("result1").getText() + "</FONT> ";
- output1.htmlText = _loc3_;
- }
- else if(_loc1_ > 104)
- {
- _loc3_ = "<FONT COLOR=\"" + strSECTION_COLOR + "\">" + nodeData.byName("labels").byName("result2").getText() + "</FONT> ";
- output1.htmlText = _loc3_;
- }
- else if(_loc1_ > 1)
- {
- var _loc2_ = nodeData.byName("labels").byName("result4").getText().split("|");
- _loc3_ = "<FONT COLOR=\"" + strSECTION_COLOR + "\">" + _loc2_[0] + " " + _loc1_ + " " + _loc2_[1] + "</FONT> ";
- output1.htmlText = _loc3_;
- }
- else
- {
- _loc2_ = nodeData.byName("labels").byName("result3").getText().split("|");
- _loc3_ = "<FONT COLOR=\"" + strSECTION_COLOR + "\">" + _loc2_[0] + " " + _loc1_ + " " + _loc2_[1] + "</FONT> ";
- output1.htmlText = _loc3_;
- }
- };
- Selection.setFocus(income_txt);
- Selection.setSelection(10,10);
-